<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
    <div class="layui-form timo-compile">
    <form th:action="@{/car/carAccess/save}">
        <input type="hidden" name="id" th:if="${carAccess}" th:value="${carAccess.id}">
        <div class="layui-form-item">
            <label class="layui-form-label">车辆号牌</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="car_number" placeholder="请输入车辆号牌" th:value="${carAccess?.car_number}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车辆类型</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="car_type" placeholder="请输入车辆类型" th:value="${carAccess?.car_type}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车辆所有人姓名</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" name="car_owner" placeholder="请输入车辆所有人姓名" th:value="${carAccess?.car_owner}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车辆进入时刻</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" id="car_in_date" name="car_in_date" placeholder="请输入车辆进入时刻" th:value="${carAccess?.car_in_date}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车辆离开时刻</label>
            <div class="layui-input-inline">
                <input class="layui-input" type="text" id="car_out_date" name="car_out_date" placeholder="请输入车辆离开时刻" th:value="${carAccess?.car_out_date}">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="remark">[[${carAccess?.remark}]]</textarea>
            </div>
        </div>
        <div class="layui-form-item timo-finally">
            <button class="layui-btn ajax-submit"><i class="fa fa-check-circle"></i> 保存</button>
            <button class="layui-btn btn-secondary close-popup"><i class="fa fa-times-circle"></i> 关闭</button>
        </div>
    </form>
</div>
<script th:replace="/common/template :: script"></script>
    <script type="text/javascript">
        layui.use(['element', 'form','laydate'], function () {
            var laydate = layui.laydate;
            //设施开放开始时间
            laydate.render({
                elem: '#car_in_date'
                , type: 'datetime'
                , range: false
                , format: 'yyyy-MM-dd HH:mm:ss'
            });

            laydate.render({
                elem: '#car_out_date'
                , type: 'datetime'
                , range: false
                , format: 'yyyy-MM-dd HH:mm:ss'
            });

        });
    </script>
</body>
</html>